package com.amado.course0202;

/**
 * Created by Administrator on 2018\4\3 0003.
 */
public class IntegerType {
    public static void main(String[] args) {
        //16 0000 = 0 00001 =1  00010 2 00100 4 01000 8 10000 16 100000 32  1000000 64 10000000 128
        // 00000011 =3 101 =5
        //0b开头
        int type2 = 0b10000;
        System.out.println("二进制="+type2);
        //0开头
        int type8 = 020;
        System.out.println("八进制="+type8);
        int type10 = 16;
        System.out.println("十进制="+type10);
        //0x开头
        int type16 = 0x10;
        System.out.println("十六进制="+type16);
        System.out.println(0b101);
        System.out.println(0b00000011+1);
        System.out.println(0b00000100);
        System.out.println(0b00000101);
        System.out.println(0b00000101+1);
        System.out.println(0b00000110);
        // 0 1 2 3 4 5 6 7
        System.out.println(0b01);
        System.out.println(0b10);
        //
        System.out.println("0112 = "+01102);
        System.out.println(020);
        //1 2 3 4 5 6 7 8 9 a b c d e f
        System.out.println(0x09);
        System.out.println(0x0a);
        System.out.println(0x0f);
        System.out.println(0x10);
    }
}
